package com.design.homework.hw0317.observer.gperadvice.v2.subscribes;

import com.google.common.eventbus.Subscribe;
import com.risesun.designpattern.observer.gperadvice.v2.question.GPerStudyQuestion;

/**
 * tom 老师关于学习方面的通知!
 * @author qiqiang.ren
 * @since 2019/3/20
 */
public class GPerStudySubscribes{
    @Subscribe
    public void subscribe(GPerStudyQuestion question){
        System.out.println("---->咕泡学习群接收到消息!<-----\n");
        System.out.println("来自:"+question.getUserName()+"的疑问:");
        System.out.println("问题描述:"+question.getContent() +"\n");
        question.getTeacher().answer(question);
    }
}
